import request from '@/utils/request'
const finance = {
  getReceivableInfoListAPI: function (params) {
    return request({
      url: '/eims/receivable/list',
      method: 'post',
      data: params
    })
  },
  saveReceivableInfoAPI: function (params) {
    return request({
      url: '/eims/receivable/save',
      method: 'post',
      data: params
    })
  },
  updateReceivableInfoAPI: function (params) {
    return request({
      url: '/eims/receivable/update/' + params.receivableCode,
      method: 'put',
      data: params
    })
  },
  deleteReceivableInfoAPI: function (receivableCode) {
    return request({
      url: '/eims/receivable/delete/' + receivableCode,
      method: 'delete'
    })
  },
  getPayableInfoListAPI: function (params) {
    return request({
      url: '/eims/payable/list',
      method: 'post',
      data: params
    })
  },
  savePayableInfoAPI: function (params) {
    return request({
      url: '/eims/payable/save',
      method: 'post',
      data: params
    })
  },
  updatePayableInfoAPI: function (params) {
    return request({
      url: '/eims/payable/update/' + params.payableCode,
      method: 'put',
      data: params
    })
  },
  deletePayableInfoAPI: function (payableCode) {
    return request({
      url: '/eims/payable/delete/' + payableCode,
      method: 'delete'
    })
  }
}
export default finance
